<!--
                       生命周期API
    选项式API              ---       组合式API
    beforeCreated/created           setup
    beforeMount                  onBeforeMount
    mounted                        onMounted
    ...                             on...
    destroyed 已经弃用，已经换成 unmounted
    beforeUnmounted              onBeforeUnmounted
    ...
 -->
<script setup>
import {onMounted} from "vue";

const getList = () => {
    setTimeout(() => {
        console.log('发送请求，获取数据...')
    }, 2000)
}
// 在 created 写的直接放在 setup 中
getList()

onMounted(() => {
    console.log('挂载结束...')
})
</script>

<template>
    <h3 style="text-align: center;">Vue3-Study</h3>
    <hr>

</template>